﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;

namespace YasharEl.Infrastructure.OrgUnit.EntityModel
{
    public class OrganizationalUnitEntity : ReadOnlyEntity, IOrganizationalUnit
    {
        #region IOrganizationalUnit Implementation

        public virtual long OrganizationalUnitId
        {
            get;
            private set;
        }

        public virtual string Description
        {
            get;
            private set;
        }

        public virtual IOrganizationalUnit ParentUnit
        {
            get;
            private set;
        }

        public virtual IList<IOrganizationalUnit> DirectChilds
        {
            get;
            private set;
        }

        public virtual IList<IEmployee> DirectMembers
        {
            get;
            private set;
        }

        #endregion

        #region AbstractEntity<long> Overrides

        public override long Id
        {
            get
            {
                return OrganizationalUnitId;
            }
            protected set
            {
                OrganizationalUnitId = value;
            }
        }

        #endregion
    }
}
